# $Id$
# Maintainer : Martin Wimpress <code@flexion.org>
# Contributor: Ernesto Ricart <ernest2193@gmail.com>

_pkgname=Plank-Config
# Convert to lowercase
pkgname=${_pkgname,,}
pkgver=1.3.1
pkgrel=2
pkgdesc="A tool to configure Plank Dock"
arch=('i686' 'loong64' 'x86_64')
url="https://github.com/ernest21/Plank-Config/"
license=('GPL')
depends=('libnotify' 'plank')
makedepends=('vala')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/ernest21/${_pkgname}/archive/${pkgver}.tar.gz" plank-config-vala.patch)
sha256sums=('3f4b8fa348198b080bc7a35eb1dca645bf4ab3e68b5e1c0f3aff2907ec17d8a0'
            '4593a3a387bbc4af0d3d9d04e6dc374fb1db5865029416cda36c4f0e89360579')

prepare() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    patch -p1 -i ../plank-config-vala.patch

    chmod +x ./autogen.sh
    NOCONFIGURE=1 ./autogen.sh
}

build() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    ./configure \
        --prefix=/usr
    make
}

package() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
}
